home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / IOInterface / deltaIOState.icl < prev    next >
Encoding:
Modula Implementation  |  1995-02-23  |  1.5 KB  |  51 lines  |  [TEXT/3PRM]

  1. implementation module deltaIOState;
  2.  
  3.  
  4. import    quickdraw;
  5. import    windowDevice, ioState, deltaIOSystem;
  6.  
  7.  
  8. /*    SetGlobalCursor sets the shape of the cursor globally. This shape overrules the local cursor
  9.     shapes of windows. */
  10.  
  11. SetGlobalCursor    :: !CursorShape !(IOState s) -> IOState s;
  12. SetGlobalCursor HiddenCursor io = io;
  13. SetGlobalCursor shape io
  14.     =    IOStateSetDevice (IOStateSetCursorShape shape io`) windows`;
  15.     where {
  16.         (windows, io`)    = IOStateGetDevice io WindowDevice;
  17.         windows`        = WindowsSetGlobalCursor shape windows;
  18.     };
  19.  
  20. WindowsSetGlobalCursor :: !CursorShape !(DeviceSystemState s) -> DeviceSystemState s;
  21. WindowsSetGlobalCursor shape (WindowSystemState (ws,_))
  22.     =    WindowSystemState (ws, GlobalCursorSet shape);
  23.  
  24.  
  25. /*    ResetCursor undoes the effect of SetGlobalCursor. */
  26.  
  27. ResetCursor    :: !(IOState s) -> IOState s;
  28. ResetCursor io
  29.     =    IOStateSetDevice io` windows`;
  30.     where {
  31.         (windows,io`)    = IOStateGetDevice io WindowDevice;
  32.         windows`        = WindowsResetCursor windows;
  33.     };
  34.  
  35. WindowsResetCursor :: !(DeviceSystemState s) -> DeviceSystemState s;
  36. WindowsResetCursor (WindowSystemState (ws,_))
  37.     =  WindowSystemState (ws, NoGlobalCursor);
  38.  
  39.  
  40. /*    ObscureCursor hides the cursor until the mouse is moved. */
  41.  
  42. ObscureCursor :: !(IOState s) -> IOState s;
  43. ObscureCursor io = IOStateChangeToolbox QObscureCursor io;
  44.  
  45.  
  46. /*    SetDoubleDownDistance sets the double down distance of the mouse. Negative values are
  47.     set to zero. */
  48.  
  49. SetDoubleDownDistance :: !DoubleDownDist !(IOState s) -> IOState s;
  50. SetDoubleDownDistance new_dddist io = IOStateSetDoubleDownDist new_dddist io;
  51.